home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 August (Alt) / CHIP 2005-08.1.iso / program / guvenlik / syslinux-3.07.exe / dos / Makefile < prev    next >
Encoding:
Makefile  |  2004-12-30  |  1.3 KB  |  61 lines

  1. CC     = gcc -m32 -mregparm=3 -DREGPARM=3
  2. LD       = ld -m elf_i386
  3. OBJCOPY  = objcopy
  4. OPTFLAGS = -g -Os -march=i386 -falign-functions=0 -falign-jumps=0 -falign-loops=0 -fomit-frame-pointer
  5. INCLUDES = -include code16.h -I. -I.. -I../libfat
  6. CFLAGS     = -W -Wall -ffreestanding -msoft-float $(OPTFLAGS) $(INCLUDES)
  7. LDFLAGS     = -T com16.ld
  8. AR       = ar
  9. RANLIB   = ranlib
  10. LIBGCC  := $(shell $(CC) --print-libgcc)
  11.  
  12. SRCS     = syslinux.c \
  13.        ../syslxmod.c ../bootsect_bin.c ../ldlinux_bin.c ../mbr_bin.c \
  14.            $(wildcard ../libfat/*.c)
  15. OBJS     = crt0.o $(patsubst %.c,%.o,$(notdir $(SRCS)))
  16. LIBOBJS     = conio.o memcpy.o memset.o  skipatou.o atou.o malloc.o free.o \
  17.        argv.o printf.o __divdi3.o __udivmoddi4.o
  18.  
  19. .SUFFIXES: .c .o .i .s .S .elf .com
  20.  
  21. VPATH = .:..:../libfat
  22.  
  23. TARGETS = syslinux.com
  24.  
  25. all: $(TARGETS)
  26.  
  27. tidy:
  28.     -rm -f *.o *.i *.s *.a .*.d *.elf
  29.  
  30. clean: tidy
  31.  
  32. spotless: clean
  33.     -rm -f *~ $(TARGETS)
  34.  
  35. installer:
  36.  
  37. syslinux.elf: $(OBJS) libcom.a
  38.     $(LD) $(LDFLAGS) -o $@ $^
  39.  
  40. libcom.a: $(LIBOBJS)
  41.     -rm -f $@
  42.     $(AR) cq $@ $^
  43.     $(RANLIB) $@
  44.  
  45. syslinux.com: syslinux.elf
  46.     $(OBJCOPY) -O binary $< $@
  47.  
  48. %.o: %.c
  49.     $(CC) -Wp,-MT,$@,-MD,.$@.d $(CFLAGS) -c -o $@ $<
  50. %.i: %.c
  51.     $(CC) $(CFLAGS) -E -o $@ $<
  52. %.s: %.c
  53.     $(CC) $(CFLAGS) -S -o $@ $<
  54. %.s: %.S
  55.     $(CC) $(CFLAGS) -D__ASSEMBLY__ -S -o $@ $<
  56.  
  57. -include .*.d
  58.  
  59.  
  60.  
  61.